import {
	createRouter,
	createWebHistory
} from 'vue-router'
import HomeView from '../views/Top/HomeView.vue'
import login from '../views//login/login.vue'
import UserView from '../views/meun/UserView.vue'
import ScoreView from '../views/meun/ScoreView.vue'
import MainView from '../views/meun/MainView.vue'
import Information from "@/views/shouye/Information.vue";
import SchoolNotice from "@/views/meun/SchoolNotice.vue";
import HomeWorkView from "@/views/meun/HomeWorkView.vue";
import AttendenceView from "@/views/meun/AttendenceView.vue";
import MessageIf from "@/views/meun/MmessageIf.vue";
import CommentView from "@/views/meun/CommentView.vue";
import Register from "@/views/login/register.vue";
const router = createRouter({
	history: createWebHistory(import.meta.env.BASE_URL),
	routes: [{
			path: '/login',
			name: 'login',
			component: login
		},
		{
			path: '/register',
			name: 'Register',
			component: Register 

		},
		{
			path: '/',
			name: 'information',
			component: Information
		},
		{
			path: '/home',
			name: 'home',
			component: HomeView,
			mate: {
				name: "主页面"
			},
			redirect: "/main",
			children: [{
				path: '/main',
				name: 'main',
				component: MainView,
				mate: {
					name: "首页"
				}
			}, {
				path: '/user',
				name: 'user',
				component: UserView,
				mate: {
					name: "用户管理"
				}
			}, {
				path: '/score',
				name: 'score',
				component: ScoreView,
				mate: {
					name: "成绩管理"
				}
			}, {
				path: '/schoolinfo',
				name: 'SchoolNotice',
				component: SchoolNotice,
				mate: {
					name: "学校通知"
				}
			}, {
				path: '/homework',
				name: 'HomeWorkView',
				component: HomeWorkView,
				mate: {
					name: "作业管理"
				}
			},  {
				path: '/attendance',
				name: 'AttendenceView',
				component: AttendenceView,
				mate: {
					name: "考勤管理"
				}
			}, {
				path: '/messages',
				name: 'Mmessageif',
				component: MessageIf,
				mate: {
					name: "留言管理"
				}
			}, {
				path: '/comments',
				name: 'CommentView',
				component: CommentView,
				mate: {
					name: "孩子信息"
				}
		
			}]
		}
	]
})

export default router